<?php $this->load->view('teacher_home/_header') ?>
<?php $this->load->view('message') ?>

<script type="text/javascript">
  $().ready(function(){
    $("#knowledge_point_li").addClass("active");

    $('.selectpicker').selectpicker();   
  });

  function check_button_click()
    {
        var id=$(".selectpicker").val();
        if(id!='0')
            location.href="<?php echo site_url('teacher_knowledge_point/check').'/'?>"+id;
    }

</script>


<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">查询知识点</h3>
        </div>
        <div class="panel-body">
            <div class="col-lg-9">
                <select class="selectpicker form-control" id="knowledge_points_select" data-live-search="true">
                    <option value="0">点击输入知识点id，内容，考点来查询知识点</option>
                    <?php foreach ($knowledge_points_all as $item ): ?>
                        <option value="<?=$item['id']?>">
                            <?php echo $item['id'].':'.$item['content'].'('.$item['test_point_content'].')'?>
                        </option>
                    <?php endforeach ?>
                </select>
            </div>
            <div class="col-lg-1">
                <button onclick="check_button_click()" class="btn btn-primary">查看</button>
            </div>
        </div>  

    </div>
</div>
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">知识点列表</h3>
        </div>
        <div class="panel-body">
            <div id="table">
                <table class="table table-striped table-hover ">
                    <thead>
                        <tr>
                            <th>知识点id</th>
                            <th>内容</th>
                            <th>相关考点</th>
                            <th></th>
                            <th>操作</th>
                            
                            <th>
                                    
                                
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($knowledge_points as $item ): ?>
                        <tr>
                            <td>
                                <?php echo $item['id']?></td>
                            <td>
                                <?php echo $item['content']?></td>

                            <td>
                                <?php echo $item['test_point_content']?></td>
                            <td>
                                
                            </td>
                            <td>
                                <a href="<?php echo site_url('teacher_knowledge_point/check').'/'.$item['id']?>">查看</a>
                            </td>
                            <td>
                                
                            </td>
                        </tr>
                        <?php endforeach; ?></tbody>
                </table>
                <?php echo $this->pagination->create_links(); ?>
            </div>

        </div>
    </div>

</div>

<?php $this->load->view('teacher_home/_footer')?>